PDF_FIGURES = graph1.pdf graph2.pdf graph3.pdf graph4.pdf p1.pdf p2.pdf p3.pdf p4.pdf p5.pdf p6.pdf p7.pdf

# Ensure that fonts are embedded in the resulting PDF file
EPSTOPDF = GS_OPTIONS="-dEmbedAllFonts=true -dPDFSETTINGS=/printer" epstopdf

compile:
	latex 574project.tex
	latex 574project.tex
	bibtex 574project
	latex 574project.tex
	latex 574project.tex

ps: compile
	dvips 574project

pdf: compile ${PDF_FIGURES}
	dvipdf 574project.dvi 574project.pdf

all: ps pdf

spellcheck:
	spell 574project.tex
	spell overview.tex
	spell testingbackground.tex
	spell mlnmodelling.tex
	spell experiment.tex

clean:
	rm -f 574project.pdf
	rm -f 574project.ps
	rm -f 574project.dvi
	rm -f 574project.aux
	rm -f 574project.blg
	rm -f 574project.log
	rm -f 574project.bbl

graph1.pdf: graph1.eps
	${EPSTOPDF} $<

graph2.pdf: graph2.eps
	${EPSTOPDF} $<

graph3.pdf: graph3.eps
	${EPSTOPDF} $<

graph4.pdf: graph4.eps
	${EPSTOPDF} $<

p1.pdf: p1.eps
	${EPSTOPDF} $<
	
p2.pdf: p2.eps
	${EPSTOPDF} $<
	
p3.pdf: p3.eps
	${EPSTOPDF} $<
	
p4.pdf: p4.eps
	${EPSTOPDF} $<
p5.pdf: p5.eps
	${EPSTOPDF} $<
	
p6.pdf: p6.eps
	${EPSTOPDF} $<
	
p7.pdf: p7.eps
	${EPSTOPDF} $<